package com.wyp168.gulimall.ware.dao;

import com.wyp168.gulimall.ware.entity.WareSkuEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import feign.Param;
import org.apache.ibatis.annotations.Mapper;

/**
 * 商品库存
 * 
 * @author wyp168
 * @email 2721255240@qq.com
 * @date 2022-10-22 20:54:21
 */
@Mapper
public interface WareSkuDao extends BaseMapper<WareSkuEntity> {

    /**
     * 根据skuId， 获取到活动库存量
     * @param skuId
     * @return
     */
    Long selectStackNumBySkuId(@Param("skuId") Long skuId);

    void addStock(@Param("skuId") Long itemId, @Param("wareId") Long wareId, @Param("skuNum") Integer skuNum);
}
